From c796f3c14f2103b08ed4a0133b080fafc12ec2c1 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Fri, 20 Feb 2009 11:08:31 +0000 Subject: [PATCH] pygrub: parse xen module option in grub Add function for GrubConf to parse xen module option in grub. Pygrub should pass args as domUloader did. Signed-off-by: Wei Kong --- tools/pygrub/src/pygrub | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/pygrub/src/pygrub b/tools/pygrub/src/pygrub index ae15af187e..e4482afeb5 100644 --- a/tools/pygrub/src/pygrub +++ b/tools/pygrub/src/pygrub @@ -501,7 +501,7 @@ def get_entry_idx(cf, entry): return None -def run_grub(file, entry, fs): +def run_grub(file, entry, fs, arg): global g global sel @@ -534,7 +534,7 @@ def run_grub(file, entry, fs): if img.initrd: grubcfg["ramdisk"] = img.initrd[1] if img.args: - grubcfg["args"] = img.args + grubcfg["args"] = img.args + " " + arg return grubcfg @@ -659,7 +659,7 @@ if __name__ == "__main__": chosencfg = sniff_solaris(fs, incfg) if not chosencfg["kernel"]: - chosencfg = run_grub(file, entry, fs) + chosencfg = run_grub(file, entry, fs, incfg["args"]) data = fs.open_file(chosencfg["kernel"]).read() (tfd, bootcfg["kernel"]) = tempfile.mkstemp(prefix="boot_kernel.", -- 2.30.2